﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using LiteStep.Utils;
using log4net;
using Ninject.Modules;
using log4net.Core;
using log4net.Repository.Hierarchy;

namespace LiteStep
{
	public static class LiteStep
	{
		private static Ninjector ninjector;
		public static Ninjector Ninjector { get { return ninjector ?? (ninjector = new Ninjector()); } }

		private static ILog log;
		public static ILog Log { get { return log ?? (log = new DefaultLog()); } }

		public static void Initialize(ILog logger = null, NinjectModule ninjectModule = null)
		{
			if (logger != null)
			{
				log = logger;
			}

			if (ninjectModule != null)
			{
				Ninjector.Initialize(ninjectModule);
			}
		}
	}
}
